package vns.server.domain;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

import com.google.appengine.api.datastore.Key;
import com.google.appengine.api.datastore.PhoneNumber;
import vns.shared.ObjectTypeTelephoneDTO;

public class ObjectTypeTelephone {
    @PrimaryKey
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
    private Key id;
	
	@Persistent
	private PhoneNumber value;
	public ObjectTypeTelephone(ObjectTypeTelephoneDTO objectTypeTelephoneDTO){
		this.value=objectTypeTelephoneDTO.getValue();
	}
	
	public void updatefromDTO(ObjectTypeTelephoneDTO objectTypeTelephoneDTO){
		this.value=objectTypeTelephoneDTO.getValue();
	}
	
	public ObjectTypeTelephoneDTO toDTO(){
		ObjectTypeTelephoneDTO otTelephone=new ObjectTypeTelephoneDTO(this.id,this.value);
		return otTelephone;
	}
	
	public Key getId(){
		return id;
	}
	
	public PhoneNumber getValue(){
		return value;
	}
	
	public void setValue(PhoneNumber Value){
		this.value=Value;
	}
}
